package test.gwtlearning.Step1;

import java.io.IOException;

import javax.servlet.http.*;
import com.google.gdata.client.http.AuthSubUtil;

public class FetcherServlet extends HttpServlet {

	public void doGet(HttpServletRequest req, HttpServletResponse res)
			throws IOException {
		String nextUrl = req.getRequestURL().toString();
		String requestUrl = AuthSubUtil.getRequestUrl(nextUrl,
				"http://docs.google.com/feeds/", false, true);
		res.getWriter()
				.print("<a href=\"" + requestUrl
						+ "\">Request token for the Google Documents Scope</a>");
	}
}
